﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HCQ2_Model.ViewModel.SysAdmin
{
    /// <summary>
    ///  用户T_User
    ///  业务模型
    /// </summary>
    public class UserModel
    {
        /// <summary>
        ///  用户编码
        /// </summary>
        public string user_guid { get; set; }
        /// <summary>
        ///  使用类别
        /// </summary>
        public int use_type { get; set; }
        /// <summary>
        ///  用户等级
        /// </summary>
        public int user_level { get; set; }
        /// <summary>
        ///  是否合伙人
        /// </summary>
        public bool is_partner { get; set; }
        /// <summary>
        ///  推荐人
        /// </summary>
        public string ref_name { get; set; }
        /// <summary>
        ///  注册时间
        /// </summary>
        public string register_date { get; set; }
        /// <summary>
        ///  更新时间
        /// </summary>
        public string modify_date { get; set; }
        [DisplayName("主键值")]
        public int user_id { get; set; }
        [Required]
        [DisplayName("用户名")]
        public string user_name { get; set; }
        [Required]
        [DisplayName("登录名")]
        public string login_name { get; set; }
        /// <summary>
        ///  单位名称
        /// </summary>
        public string user_unit { get; set; }
        /// <summary>
        ///  用户所属单位
        /// </summary>
        public string unit_code { get; set; }
        //[Required]
        [DisplayName("密码")]
        public string user_pwd { get; set; }
        [DisplayName("性别")]
        public string user_sex { get; set; }
        [DisplayName("所属角色")]
        public string user_role { get; set; }
        [DisplayName("QQ")]
        public string user_qq { get; set; }
        [DisplayName("Email")]
        public string user_email { get; set; }
        [DisplayName("电话号码")]
        public string user_phone { get; set; }
        [DisplayName("联系地址")]
        public string user_address { get; set; }
        [DisplayName("出生日期")]
        public string user_birth { get; set; }
        [DisplayName("备注")]
        public string user_note { get; set; }
        [DisplayName("用户类别")]
        public string user_type { get; set; }
        [DisplayName("身份证")]
        public string user_identify { get; set; }
        public int id { get; set; }
        public int orgUnit { get; set; }//组织机构代码
        /// <summary>
        ///  0：禁用
        ///  1：启用
        /// </summary>
        [DisplayName("状态")]
        public int status { get; set; }
        /// <summary>
        ///  充值金额 VR金币
        /// </summary>
        public decimal buy_gold { get; set; } = 0;
        /// <summary>
        ///  赠送金额
        /// </summary>
        public decimal give_gold { get; set; } = 0;
        [DisplayName("机器码最大绑定数")]
        public int max_machine { get; set; }
    }
    public class ModifyUser
    {
        /// <summary>
        ///  旧密码
        /// </summary>
        [Required(ErrorMessage = "请输入旧密码")]
        public string oldPassword { get; set; }
        /// <summary>
        ///  新密码
        /// </summary>
        [Required(ErrorMessage = "请输入新密码")]
        public string newPassword { get; set; }
    }
}
